﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using LeMigue.TeamPortal.Base.Biz.Interface;
using LeMigue.Scrum.Iterface.Model;
using System.Web;

namespace LeMigue.TeamPortal.Dev
{
    public class DevCurrentUser : ICurrentUser
    {

        private IDictionary<string, User> _usuarios = new Dictionary<string, User>();

        public DevCurrentUser()
        {
            _usuarios.Add("Usuario", new User("Usuario", "Usuario"));
            _usuarios.Add("Admin", new User("Admin", "Admin"));
        }

        public User GetUser(HttpContext context)
        {
            if (_usuarios.ContainsKey(context.User.Identity.Name))
                return _usuarios[context.User.Identity.Name];

            return null;
        }

        public IList<User> Usuarios
        {
            get
            {
                return new ReadOnlyCollection<User>(_usuarios.Values.ToList());
            }
        }
    }
}
